﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StripeOne.Web.Core.Configuration;

namespace StripeOne.Web.Core.Common
{
    public class Translation : StripeOneXml
    {
        public Translation() : this("common") { }

        public Translation(string file) : base(file, true) { }

        public static Translation Default { get { return new Translation("pt-br.s1config"); } }

        public string GetText(string section, string key)
        {
            return this.GetValue(section, key);
        }
        
        public static string GetCurrentHost()
        {
            string host = String.Empty;
            try
            {
                host = HttpContext.Current.Request.Url.Host;
            }
            catch { }
            return host;
        }
    }
}